<?php slot('article','active'); ?>
<div class="W100p mainptn">
	<div class="Cw1280">
        <!--成长烦恼-->
        <div class="Czfn_div" style="padding-top:20px; width:860px;">
            <div class="DetitleCt"><?php echo $article->getTitle(); ?></div>
            <div class="Debianqian borb2">
                <?php foreach($article->getTagToArray() as $tag): ?>
                <li><?php echo $tag; ?></li>
                <?php endforeach; ?>
                <span style="float:right; font-size:12px; color:#999;">发布时间：<?php echo $article->getTimeAgoToString(); ?></span></div>
            <div class="Delistd bgno">
                <div class="GrenCont">
                	<p><?php echo $article->getRaw('content'); ?></p>
                </div>
            </div>
            
            <div class="XzPl">
            	<div class="zxpltitle">文章评论</div>
                <form action="<?php echo url_for('article/comment');?>" method="post" class="zxplForm">
                	 <input type="hidden" name="article_id" value="<?php echo $article->getId(); ?>" />
                    <textarea name="content" id="comment_content"></textarea>
                    <input type="submit" name="" id="post_comment" value="发表评论">
                    <!--<button type="submit"  class="pull-right btn btn-green">发表评论</button>-->
                </form>
            </div>
			
            <div class="xzplist">
            <?php foreach($comments as $key => $comment): ?>
                <div class="Pllist">
                	<div class="plpto"><img src="<?php echo $comment->getUser()->getCover(); ?>" width="38" height="38"></div>
                    <div class="pltx" style="width:810px;">
                    	<div class="pluser"><?php echo $comment->getUser()->getNickname(); ?>　<span><?php echo $comment->getTimeAgo(); ?></span><font><?php echo $key+1; ?>#</font></div>
                        <div class="plcont"><?php echo $comment->getRaw('content'); ?></div>
                    </div>
                </div>
                <?php endforeach; ?>
            </div>
        </div>
        
        <!--右边-->
        <div class="DeRight" style="width:360px;">
        	<div class="Detitle2"><h1>专栏作者</h1></div>
            <div class="zlzdiv">
            	<div class="zlzdivc">
                    <div class="zlzimg"><!--图片--><img src="<?php echo $article->getAuthorObj()->getThumbCover('authorlistcover'); ?>" width="80" height="80" /></div>
                    <div class="zlzdic">
                    	<h1><?php echo $article->getAuthorObj()->getName(); ?></h1>
                        <!--<h2><?php // echo $article->getAuthorObj()->getDescription(); ?></h2>-->
                        <h3 class="bgno" style="text-indent:0px;">发表文章数：<a href="javascript:void(0)"><?php echo $article->getAuthorObj()->getArticleNum(); ?></a></h3>
                    </div>
                    <div class="zlzjs"><?php echo $article->getAuthorObj()->getDescription(); ?></div>
                </div>
            </div>
            
        	<div class="Detitle2"><h1>作者其它文章</h1><h3>文章数：<a href=""><?php echo $article->getAuthorObj()->getArticleNum(); ?></a></h3></div>
         <?php include_component('article', 'author_other_article', array('author'=>$article->getAuthorObj(),'current_article_id'=>$article->getId())); ?>
            
        </div>
        
    </div>
</div>

<script type="text/javascript">
$(document).ready(function(){
    $("#post_comment").click(function(){
        var var_ = $.trim($("#comment_content").val());
        if(var_.length == 0){
            alert('评论内容不能为空！');
            return false;
        }
        return true;
    });
});

<?php if($sf_user->hasFlash('error')): ?>
alert("<?php echo $sf_user->getFlash('error'); ?>");
<?php endif; ?>
<?php if($sf_user->hasFlash('success')): ?>
alert("<?php echo $sf_user->getFlash('success'); ?>");
<?php endif; ?>
</script>